<?php
$params = array_merge(
    require(__DIR__ . '/../../common/config/params.php'),
    require(__DIR__ . '/../../common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'app-hwapp',
    'basePath' => dirname(__DIR__),
    'bootstrap' => ['log'],
    'controllerNamespace' => 'hwapp\controllers',
     'modules'=>[
         'doconline' => [
             'class' => 'Kaopur\yii2_doc_online\Module',
             'defaultRoute' => 'base', //默认控制器
             'appControllers' => true, //是否检测app\controllers命名空间下的控制器
             'suffix' => '', //后缀
             'prefix' => '', //前缀
             'modules' => [  //需要生成文档的模块命名空间
                 'hwapp\modules\hwapi\Module',
             ]
         ],
         'hwapi' => [
             'class' => 'hwapp\modules\hwapi\Module'
         ],
     ],
    'components' => [
        'request' => [
            'csrfParam' => '_csrf-hwapp',
        ],
        'user' => [
            'identityClass' => 'hwapp\models\EcsUsers',
            'enableAutoLogin' => true,
            'identityCookie' => ['name' => '_identity-hwapp', 'httpOnly' => true],
        ],
        'session' => [
            // this is the name of the session cookie used for login on the hwapp
            'name' => 'advanced-hwapp',
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
//        /*
//        'urlManager' => [
//            'enablePrettyUrl' => true,
//            'showScriptName' => false,
//            'rules' => [
//            ],
//        ],
//        */
    ],
    'params' => $params,
];
